//
//  Computer.m
//  OC02_作业
//
//  Created by dllo on 15/12/1.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import "Computer.h"

@implementation Computer
- (void)information{
    NSLog(@"type:%@, size:%d", _type, _size);
}

//- (void)setType:(NSString *)type {
//    _type = type;
//}
//- (NSString *)type {
//    return _type;
//}
//
//- (void)setSize:(int)size {
//    _size = size;
//}
//- (int)size {
//    return _size;
//}

- (instancetype)initWithType:(NSString *)type
                        size:(int)size {
    self = [super init];
    if (self) {
        _type = type;
        _size = size;
    }
    return self;
}

+ (instancetype)computerWithType:(NSString *)type
                            size:(int)size {
    Computer *computer = [[Computer alloc] initWithType:type size:size];
    return computer;
}
@end
